<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>数组排序</title>
	</head>
	<body>
		<script>
			// 3 请用JS代码把数组 arr = [1,23,12,7,3,28,2,14]按正序的方式排序。

			const arr = [1, 23, 12, 7, 3, 28, 2, 14]
			const newArr = arr.sort(function (a, b) {
				return a - b
			})
			console.log(newArr)
		</script>
	</body>
</html>
